<template>
    <div class="template" @click="tap">
        <div class="time">
            <img :src="item.img" alt="">
            {{item.time}}
        </div>
        <div class="title">{{item.title}}</div>
         <img :src="item.img" alt="" style="width: 100%">
        <div class="text">
            {{item.text}}
        </div>
        <div class="action">
            <img src="../../assets/images/pig.jpg" alt="">{{item.actionOne}}
            <img src="../../assets/images/pig.jpg" alt="">{{item.actionTwo}}
        </div>
    </div>
</template>
<script>
export default {
    props:['item','index'],
    data(){
        return {
        }
    },
    created(){
    },
    methods:{
        tap(){
           wx.navigateTo({
               //注意跳转的路径 pages/detail/main 要在app.json中申明.并且使用url时加/
                url:'/pages/detail/main?index=' + this.index
            })
        }
    }
}
</script>
<style scoped>
    .time {
        font-size: 30rpx;
    }
    .time img{
        width: 40rpx;
        height: 40rpx;
        border-radius: 50%;
        margin: 20rpx 20rpx 0 20rpx;
        vertical-align: bottom;
    }
    .title {
        font-weight: 900;
         font-size: 40rpx;
         margin: 25rpx 0 10rpx 15rpx;
    }
    .title img {
        height: 160rpx;
    }
    .text {
        text-indent: 2em;
        line-height: 50rpx;
        font-size: 35rpx;
        padding: 0 10rpx 10rpx 10rpx;
    }
    .action {
        font-size: 30rpx;
        text-align: right;
    }
    .action img {
        width: 30rpx;
        height: 30rpx;
        border-radius: 50%;
        margin: 0 10rpx;
        
    }
</style>
